/**
 * 接口文件
 */

import MANA from "./constant";

import {setStorage,getStorage, removeStorage} from "./care";

export default {
    install(Vue){
        Vue.prototype.$storage = this;
    },
    setToken(token){
        setStorage(MANA.TOKEN,token)
    },
    getToken(){
        getStorage(MANA.TOKEN)
    },
    removeToken(){
        removeStorage(MANA.TOKEN)
    },
    checkoutMobile(mobile) {
       var reg = /^1[3456789]\d{9}$/;
       if (reg.test(mobile)) {
         return true;
       } else {
         return false;
       }
    },
}

    